home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 409_01 / makefile < prev    next >
Encoding:
Makefile  |  1993-10-21  |  3.0 KB  |  111 lines

  1. #############################################################################
  2. #
  3. #                   Copyright (C) 1993 SciTech Software
  4. #                           All rights reserved.
  5. #
  6. # Descripton:   Makefile for the SuperVGA test library.
  7. #               MSDOS version for Borland C++ 3.0
  8. #
  9. # $Id: makefile 1.2 1993/10/22 08:57:59 kjb Exp $
  10. #
  11. #############################################################################
  12.  
  13. # Turn on autodependency checking
  14.  
  15. .AUTODEPEND
  16.  
  17. # Let make know where to find all the appropriate files
  18.  
  19. .PATH.asm       = .
  20. .PATH.lib       = .
  21. .PATH.obj       = .
  22. .PATH.exe       = .
  23.  
  24. CC              = bcc               # Name of C compiler
  25. ASM             = tasm              # Name of assembler
  26. LINK            = tlink             # Name of linker
  27. LIB             = tlib              # Name of librarian
  28. LIB_FLAGS       = /C
  29.  
  30. !if $d(debug)
  31. CC_DOPT         = -v                # Turn on debugging for C compiler
  32. ASM_DOPT        = /ZI               # Turn on debugging for assembler
  33. LINK_OPT        = /v /m /s          # Turn on debugging for linker, and mapfile
  34. DEBUG           = -Ddebug
  35. !endif
  36.  
  37. # We must assemble the test programs in the large memory model
  38.  
  39. MODEL           = l
  40. ASM_MODEL       = /d__LARGE__
  41.  
  42. ASM_FLAGS       = /MX /m /i$(.PATH.asm) $(ASM_DOPT) $(ASM_MODEL)
  43. CC_FLAGS        = -m$(MODEL) $(CC_DOPT)
  44.  
  45. # Implicit rules to make the object files for the test code
  46.  
  47. .c.obj:
  48.     $(CC) $(CC_FLAGS) -c {$< }
  49.  
  50. .asm.obj:
  51.     $(ASM) $(ASM_FLAGS) $<, $(.PATH.obj)\$&
  52.  
  53. # Object files required to build the libraries
  54.  
  55. OBJECTS         = svgac.obj svga.obj
  56.  
  57. all: test16.exe test256.exe test32k.exe test64k.exe test16m.exe paranoid.exe
  58.  
  59. test16.exe: test16.obj svga.lib cpu.obj
  60.     $(CC) $(CC_FLAGS) -e$< test16.obj svga.lib cpu.obj
  61.  
  62. test256.exe: test256.obj svga.lib cpu.obj
  63.     $(CC) $(CC_FLAGS) -e$< test256.obj svga.lib cpu.obj
  64.  
  65. test32k.exe: test32k.obj svga.lib cpu.obj
  66.     $(CC) $(CC_FLAGS) -e$< test32k.obj svga.lib cpu.obj
  67.  
  68. test64k.exe: test64k.obj svga.lib cpu.obj
  69.     $(CC) $(CC_FLAGS) -e$< test64k.obj svga.lib cpu.obj
  70.  
  71. test16m.exe: test16m.obj svga.lib cpu.obj
  72.     $(CC) $(CC_FLAGS) -e$< test16m.obj svga.lib cpu.obj
  73.  
  74. paranoid.exe: paranoid.obj svga.lib cpu.obj
  75.     $(CC) $(CC_FLAGS) -e$< paranoid.obj svga.lib cpu.obj
  76.  
  77. # Target to make each of the library file
  78.  
  79. svga.lib: $(OBJECTS)
  80.     buildrsp &&!|
  81.     $(OBJECTS)
  82. !   > temp.rsp
  83.     $(LIB) $(LIB_FLAGS) $< @temp.rsp
  84.     del temp.rsp
  85.  
  86. # Clean up directory removing all files not needed to make the library
  87.  
  88. clean:
  89.     @del *.sym *.bak *.tdk *.map *.dsk *.log
  90.     except (cpu.obj svga.obj) del *.obj
  91.  
  92. realclean:  clean
  93.     @del *.exe *.lib *.obj
  94.  
  95. stamp:
  96.     @foreach "rcs -N$(VERSION): -srelease" files.lst
  97.  
  98. rcsclean:
  99.     @foreach rcsclean files.lst
  100.  
  101. # Check in the latest revisions of source files with RCS
  102.  
  103. ci:
  104.     @foreach "ci -q -u -mupdate $(RCSOPT)" files.lst
  105.  
  106. # Check out the latest revisions of source files from RCS
  107.  
  108. co:
  109.     @foreach "co -q $(RCSOPT)" files.lst
  110.  
  111.